
Imports System.Data
Partial Class Admin_frmHome
    Inherits System.Web.UI.Page
    Dim x As String
    Dim dt As New datatable
    Dim _EmployeeId As String
    Dim _bo As New Bo
    Protected Sub Page_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load
        _EmployeeId = Session("EmpId")
        If _EmployeeId = "" Then
            Response.Redirect("../Client/frmLogin.aspx")
        Else
            dt = _bo.GetLastLogin(_EmployeeId)
            x = dt.Rows(0).Item(4).ToString
            If x = "" Then
                lblLastLogin.Visible = "true"
                lblLastLogin.Text = "Welcome , You have No Last Login Time "
            Else
                lblLastLogin.Visible = "true"
                lblLastLogin.Text = "Last Login : " & x
            End If
            lblEmplyeeId.Text = dt.Rows(0).Item(0).ToString
            lblFirstName.Text = dt.Rows(0).Item(1).ToString
            lblEmailId.Text = dt.Rows(0).Item(2).ToString
            lblDesignation.Text = dt.Rows(0).Item(3).ToString
        End If
    End Sub
End Class
